<!DOCTYPE html>
<html>
<head>
	
	<title>单列布局</title>
	<style type="text/css">
		body{
			margin: 0;
			padding: 0;
		}
		.top{
			height: 100px;
			background: blue;

		}
		.main{
			width: 800px;
			height: 300px;
			background: red;
			margin: 0 auto;
		}
		.foot{
			width: 800px;
			height: 100px;
			background: green;
			margin: 0 auto;
		}
	</style>
</head>
<body>
<div class="top"></div>

<div class="main"></div>
<dir class="foot"></dir>
</body>
</html>